package runnerworm.ui;

import runnerworm.core.*;
import java.awt.*;
import javax.swing.*;

/**
 * <p>Title: NewGameEvent</p>
 * <p>Description: An event launched when the New game option is selected.</p>
 * @author Guilherme Mauro Germoglio Barbosa
 */

public class NewGameEvent
    extends UserInterfaceEvent {

  /**
   * Where the game will be shown.
   */
  private JPanel panel;
  /**
   * Where the score will be shown.
   */
  private JLabel score;
  /**
   * The game's options.
   */
  private GameOptions gameOptions;


  /**
   * Constructor. It will indicate this UserInterfaceEvent is a NewGameEvent
   * @param userInterfaceEventLauncher The event's source.
   * @param gameOptions The game's options.
   * @param score The game's score.
   * @param panel Where the game will be shown.
   */
  public NewGameEvent(UserInterfaceEventLauncher userInterfaceEventLauncher,
                      GameOptions gameOptions, JLabel score, JPanel panel) {
    super(userInterfaceEventLauncher, UserInterfaceEvent.NEW_GAME);
    this.gameOptions = gameOptions;
    this.score = score;
    this.panel = panel;
  }

  /**
   * Returns the game's options.
   * @return The game's options.
   */
  public GameOptions getGameOptions() {
    return gameOptions;
  }

  /**
   * Returns the game's score.
   * @return The game's score.
   */
  public JLabel getScore() {
    return score;
  }
  /**
   * Returns where the game will be shown.
   * @return The JPanel object - where the game will be drawn.
   */
  public JPanel getJPanel() {
    return panel;
  }



}
